<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <include file="Public:resource"/>
    <title>预存充值</title>
</head>
<body>
<div class="container">
    <include file="Public:topWithoutBack" title="预存充值"/>

    <empty name="relevanceModel">
        <div class="row" style="margin-top: 50px;">
            <div class="col-xs-12 col-sm-12 col-mg-12 col-md-12" style="font-size: medium;" align="center">
                您尚未绑定任何水费账号
            </div>
        </div>
        <div class="row" style="margin-top: 10px;">
            <div class="col-xs-12 col-sm-12 col-mg-12 col-md-12">
                <input type="button" class="btn btn-lg btn-block jss-button"
                       onclick="onBind() " value="立即绑定"/>
            </div>
        </div>

        <else/>
        <div class="row" style="margin-top: 20px;">
            <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 align-to-input medium" align="center">
                水费账号
            </div>
            <div class="col-xs-9 col-sm-9 col-md-9 col-lg-9">
                <select name="userid" id="userid" class="select">
                    <foreach name="relevanceModel" item="relevance">
                        <option value="{$relevance.userid}">{$relevance.userid}</option>
                    </foreach>
                </select>
            </div>
        </div>

        <div class="row" style="margin-top: 20px;">
        <div class="col-xs-12 col-sm-12 col-mg-12 col-md-12">
            <div><input type="button" class="btn btn-lg btn-block jss-button"
                        onclick="onSearch() " value="查询"/>
            </div>
        </div>
    </div>

    </empty>

    <include file="Public:menu"/>
</div>
<script>
    //跳转到绑定
    function onBind(){
        window.location.href="{:U('Bind/add')}";
    }
    //查询预存余额
    function onSearch(){
        window.location.href="{:U('PreSave/detail')}&userid="+$("#userid").val();
    }
</script>
</body>
</html>